<div>
    <div class="lter b-b wrapper-md ng-scope">
        <h4 class="m-n font-thin">添加桌号类型</h4>
    </div>
    <div class="panel-body">
        <form name="tableTypeForm">
            <div class="form-horizontal form-validation">
                <div class="form-group">
                    <label class="col-sm-3 control-label">类型名称</label>
                    <div class="col-sm-6">
                        <input type="text" name="name" ng-model="tableTypeAddVO.name" class="form-control m-b-xs" placeholder="请输入类型名" required>
                        <div ng-if="tableTypeForm.name.$touched">
                            <p ng-if="tableTypeForm.name.$error.required" class="text-danger h6">类型名是必需的</p>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">基本收费</label>
                    <div class="col-sm-6">
                        <input type="number" name="basicMoney" ng-model="tableTypeAddVO.basicMoney" class="form-control m-b-xs" placeholder="请输入首费" ng-pattern="/^([1-9][\d]*|0)(\.[\d]{1,2})?$/" required>
                        <div ng-if="tableTypeForm.basicMoney.$touched">
                            <p ng-if="tableTypeForm.basicMoney.$error.required" class="text-danger h6">首费是必需的</p>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">续费人数</label>
                    <div class="col-sm-6">
                        <input type="number" name="incrementPeople" ng-model="tableTypeAddVO.incrementPeople" class="form-control m-b-xs" placeholder="请输入续人" ng-pattern="/^([1-9][\d]*|0)$/" required>
                        <div ng-if="tableTypeForm.incrementPeople.$touched">
                            <p ng-if="tableTypeForm.incrementPeople.$error.required" class="text-danger h6">续人是必需的</p>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">续起收费</label>
                    <div class="col-sm-6">
                        <input type="number" name="incrementMoney" ng-model="tableTypeAddVO.incrementMoney" class="form-control m-b-xs" placeholder="请输入续费" ng-pattern="/^([1-9][\d]*|0)(\.[\d]{1,2})?$/" required>
                        <div ng-if="tableTypeForm.incrementMoney.$touched">
                            <p ng-if="tableTypeForm.incrementMoney.$error.required" class="text-danger h6">续费是必需的</p>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">最小人数</label>
                    <div class="col-sm-6">
                        <input type="number" name="minNumber" ng-model="tableTypeAddVO.minNumber" class="form-control m-b-xs" placeholder="请输入最小人数" ng-pattern="/^([1-9][\d]*|0)$/" required>
                        <div ng-if="tableTypeForm.minNumber.$touched">
                            <p ng-if="tableTypeForm.minNumber.$error.required" class="text-danger h6">最小人数是必需的</p>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">最大人数</label>
                    <div class="col-sm-6">
                        <input type="number" name="maxNumber" ng-model="tableTypeAddVO.maxNumber" class="form-control m-b-xs" placeholder="请输入最大人数" ng-pattern="/^([1-9][\d]*|0)$/" required>
                        <div ng-if="tableTypeForm.maxNumber.$touched">
                            <p ng-if="tableTypeForm.maxNumber.$error.required" class="text-danger h6">最大人数是必需的</p>
                        </div>
                        <p ng-if="tableTypeAddVO.minNumber>tableTypeAddVO.maxNumber" class="text-danger h6">最小人数必需小于最大人数</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">有效使用时间(分)</label>
                    <div class="col-sm-6">
                        <input type="number" name="validTime" ng-model="tableTypeAddVO.validTime" class="form-control m-b-xs" placeholder="请输入有效使用时间" ng-pattern="/^([1-9][\d]*|0)$/" required>
                        <div ng-if="tableTypeForm.maxNumber.$touched">
                            <p ng-if="tableTypeForm.maxNumber.$error.required" class="text-danger h6">有效使用时间是必需的</p>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 text-right control-label m-t-md">允许预约时间区段</label>
                    <div class="col-sm-6">
                        <div class="inline">
                            <div class="pull-left m-r-xs" ng-controller="TimeCtrl">
                                <timepicker ng-model="tableTypeAddVO.startTime" ng-change="changed()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></timepicker>
                            </div>
                            <p class="m-t-xl pull-left m-r-xs">—</p>
                            <div class="pull-left" ng-controller="TimeCtrl">
                                <timepicker ng-model="tableTypeAddVO.endTime" ng-change="changed()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></timepicker>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="text-right">
                    <button class="btn btn-success btn-sm m-r-xs" ng-click="add()" ng-if="!addState" ng-disabled="tableTypeForm.$invalid">保存</button>
                    <button class="btn btn-success btn-sm m-r-xs" ng-if="addState" disabled>保存中</button>

                    <a href="" class="b-a b-success btn btn-sm text-success h6 m-r-xs" ng-click="cancel()">取消</a>
                </div>
            </div>
        </form>
    </div>
</div>